//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package org.come.until;

import java.math.BigDecimal;

public class CustomFunction {
	public CustomFunction() {
	}

	public static double XS(long v, double xs) {
		if (v <= 0) {
			return 0.0;
		} else {
			while(v / 16 > 0) {
				v /= 16;
				xs *= 1.86;
			}

			xs *= 1.0 + 0.86 * ((double)v / 16);
			return (new BigDecimal(xs)).setScale(2, 4).doubleValue();
		}
	}

	public static void main(String[] args) {
		long qm = 20000000;
		double xs = 0.0;
		double value = 55;

		do {
			xs += 0.01;
		} while(XS(qm, xs) < value);

		//system.out.println(xs + ":" + XS(qm, xs));
		//system.out.println(xs + ":" + XS(qm, 1.3));
	}
}
